package com.zhenhao.xsq.ui.activity.user.module;

import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.test.TestActivity;
import com.zhenhao.xsq.ui.activity.test.contract.TestContract;
import com.zhenhao.xsq.ui.activity.test.presenter.TestPresenter;
import com.zhenhao.xsq.ui.activity.user.UserCardActivity;
import com.zhenhao.xsq.ui.activity.user.contract.UserCardContract;
import com.zhenhao.xsq.ui.activity.user.presenter.UserCardPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author William
 * @Package com.cxwl.xlxgj.ui.activity.patrol
 * @Description: The moduele of PatrolRecordActivity, provide field for PatrolRecordActivity
 * @date 2019/04/17 14:23:19
 */
@Module
public class UserCardModule {
    private final UserCardContract.View mView;


    public UserCardModule(UserCardContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public UserCardPresenter provideUserCardPresenter(HttpAPIWrapper httpAPIWrapper, UserCardActivity mActivity) {
        return new UserCardPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public UserCardActivity provideUserCardActivity() {
        return (UserCardActivity) mView;
    }
}